/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package schema.xml;

import java.util.ArrayList;
import java.util.List;
import javax.jws.WebService;
import org.netbeans.j2ee.wsdl.getservice.GetServicePortType;
import org.netbeans.xml.schema.service.Program;
import org.netbeans.xml.schema.service.Service;
import org.netbeans.xml.schema.service.Service.Programs;

/**
 *
 * @author oleg
 */
@WebService(serviceName = "getServiceService", portName = "getServicePort", endpointInterface = "org.netbeans.j2ee.wsdl.getservice.GetServicePortType", targetNamespace = "http://j2ee.netbeans.org/wsdl/getService", wsdlLocation = "WEB-INF/wsdl/NewWebServiceFromWSDL/getService.wsdl")
public class NewWebServiceFromWSDL implements GetServicePortType {

    public void getServiceOperation(org.netbeans.xml.schema.service.Services serviceParam)
    {
        List<Service> services = new ArrayList<Service>();
        System.out.println("------>>>>> " + serviceParam.getService().size());
        Service s = new Service();
        Programs programs = new Programs();
        programs.setProgram(new ArrayList<Program>());
        Program prog = new Program();
        prog.setName("test program");
        programs.getProgram().add(prog);
        s.setPrograms(programs);
        services.add(s);
        serviceParam.setService(services);
    }

}
